package com.smart.campus.controller;

import com.smart.campus.dto.DangerDetails;
import com.smart.campus.dto.HiddenDanger;
import com.smart.campus.interfaces.DangerServiceApi;
import com.smart.campus.pojo.PagedResponse;
import com.smart.campus.service.DangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DangerController implements DangerServiceApi {

    @Autowired
    private DangerService dangerService;

    @Override
    public PagedResponse<HiddenDanger> findDangerPagination(HiddenDanger hiddenDanger, Integer pageNum, Integer pageSize) {
        return dangerService.findDangerPagination(hiddenDanger,pageNum,pageSize);
    }

    @Override
    public void addDanger(HiddenDanger hiddenDanger) {
        dangerService.addDanger(hiddenDanger);
    }

    @Override
    public HiddenDanger getDangerById(Long id) {
        return dangerService.getDangerById(id);
    }

    @Override
    public void assignPersonnelDanger(DangerDetails dangerDetails) {
        dangerService.assignPersonnelDanger(dangerDetails);
    }
}
